<template>
	<view class="page">
		<view class="top-box">
			<image class="bg" src="/static/images/my2.png" mode=""></image>
			<view class="status-bar">
				
			</view>
			<view class="nav" @click="goBack">
				<u-icon name="arrow-left" size="34rpx" color="#ffffff"></u-icon>
				<view class="title">我的贯金</view>
			</view>
			<view class="card">
				<view class="card-item">
					<view class="t">
						贯金(复购分成)
					</view>
					<view class="num">
						{{info.mr_money}}
					</view>
				</view>
				<view class="card-item">
					<view class="t">
						直接分享奖
					</view>
					<view class="num">
						{{info.zt_money}}
					</view>
				</view>
				<view class="card-item">
					<view class="t">
						间接分享奖
					</view>
					<view class="num">
						{{info.jt_money}}
					</view>
				</view>
				<!-- jt间推 mr分红 zt直推  yj业绩 -->
				<view class="card-item">
					<view class="t">
						新增业绩奖
					</view>
					<view class="num">
						{{info.yj_money}}
					</view>
				</view>
			</view>
		</view>
		<view class="list">
			<view class="item" v-for="(item,index) in list.data" :key="index">
				<view class="right-box">
					<view class="name-wrap">
						<view class="name">
							{{item.memo}}
						</view>
					</view>
					<view class="date">
						{{item.createtime}}
					</view>
				</view>
				<view class="money">
					+{{item.money}}
				</view>
			</view>
		</view>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				info:{},
				list: [],
			};
		},
		onLoad() {
			this.getList()
		},
		methods:{
			getList(){
				this.$http('user.commissionLog', {date:this.current}).then(res => {
					if(res.data){
						this.info = res.data
						this.list=res.data.list
					}
				});
			}
		}
	}
</script>
<style lang="scss" scoped>
	.status-bar {
		height: var(--status-bar-height);
		width: 100%;
	}
	.top-box{
		position: relative;
		width: 750rpx;
		height: 684rpx;
		.bg{
			width: 750rpx;
			height: 684rpx;
		}
		.nav{
			position: absolute;
			top: var(--status-bar-height);
			padding: 0  34rpx;
			height: 88rpx;
			display: flex;
			align-items: center;
			.title{
				font-weight: 500;
				font-size: 32rpx;
				color: #FFFFFF;
				line-height: 38rpx;
				text-align: left;
				margin-left: 20rpx;
			}
		}
		.card{
			position: absolute;
			top: calc(var(--status-bar-height) + 108rpx);
			padding: 0 32rpx;
			justify-content: space-between;
			display: flex;
			flex-wrap: wrap;
			width: 750rpx;
			.card-item{
				width: 328rpx;
				height: 162rpx;
				background: #FFFFFF;
				border-radius: 16rpx 16rpx 16rpx 16rpx;
				padding: 34rpx 28rpx;
				position: relative;
				margin-bottom: 28rpx;
				.img{
					position: absolute;
					top: 26rpx;
					right: 10rpx;
					width: 70rpx;
					height: 70rpx;
				}
				.t{
					font-size: 28rpx;
					color: #666666;
					line-height: 34rpx;
					margin-bottom: 22rpx;
				}
				.num{
					font-weight: bold;
					font-size: 40rpx;
					color: #333333;
				}
			}
		}
	}
	.list{
		top: -90rpx;
		background: #FFFFFF;
		padding:8rpx 32rpx 50rpx;
		position: relative;
		.item{
			height: 132rpx;
			display: flex;
			align-items: center;
			border-bottom: 2rpx solid #F4F4F4;
			.money{
				font-weight: 500;
				font-size: 36rpx;
				color: #FF9A38;
				line-height: 50rpx;
			}
			.avatar{
				width: 68rpx;
				height: 68rpx;
				border-radius: 34rpx;
				margin-right: 42rpx;
			}
			.right-box{
				flex: 1;
				.name-wrap{
					display: flex;
					.name{
						font-weight: 500;
						font-size: 28rpx;
						color: #333333;
						line-height: 33rpx;
					}
					.tag{
						background: #FF9A38;
						border-radius: 14rpx;
						width: 56rpx;
						height: 28rpx;
						font-weight: 400;
						font-size: 20rpx;
						text-align: center;
						color: #FFFFFF;
						line-height: 28rpx;
						margin-left: 10rpx;
					}
				}
				.date{
					margin-top: 10rpx;
					font-weight: 500;
					font-size: 24rpx;
					color: #999999;
					line-height: 28rpx;
				}
			}
		}
	}
</style>
